﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Tong;
using Tong.TongJS_Prompt;
using Tong.Fy;
public partial class aspnet_admin_bock_Gbook_ShowLyS : System.Web.UI.Page
{
    /// <summary>
    /// 数据操作通用类 实例 TextData
    /// </summary> 
    public TongUse TextData = new TongUse();

    /// <summary>
    /// 系统安装绝对路径
    /// </summary>
    public string Abs_Path = TongUse.SysPath;
    /// <summary>
    /// 用户存放数据的临时表
    /// </summary>
    DataTable MyDt = new DataTable();

    /// <summary>
    /// JS提示工能
    /// </summary>
    JsPrompt jspro = new JsPrompt();

    FenYe FY = new FenYe();
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            BindData();
        }

    }

    /// <summary>
    /// 提问的搜索功能
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button1_Click(object sender, EventArgs e)
    {
        GridView1.DataSource = FY.Fy("select * from [CX_Gbook] where CX_Gbook_Name like '%" + Cx_FAQonLine_Question.Text.Trim() + "%' order by CX_Gbook_id desc", 300);
        GridView1.DataBind();
        Div.InnerHtml = FY.GetHTML;
    }


    protected void BindData()
    {

        GridView1.DataSource = FY.Fy("select * from [CX_Gbook] order by CX_Gbook_Sort desc, CX_Gbook_id desc", 30);
        GridView1.DataBind();
        Div.InnerHtml = FY.GetHTML;

    }




    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string RedirID = ((LinkButton)sender).CommandArgument.ToString();
        if (RedirID != "")
        {
            Response.Redirect("CX_GBook_Edit.aspx?id=" + RedirID);
        }
    }
}
